package com.quanyan.riding.service;

import com.quanyan.api.APIResponse;
import com.quanyan.riding.entity.db.TbRidingBikePeople;
import com.quanyan.riding.entity.vo.req.ReqJoinRidingBike;
import com.quanyan.riding.entity.vo.req.ReqUpdateBikePeopleLocation;
import com.quanyan.riding.entity.vo.resp.RespRidingBikeManager;
import com.quanyan.riding.entity.vo.resp.RespRidingCheckBike;
import com.quanyan.riding.entity.vo.resp.RespUpdateBikePeopleLocation;
import java.util.List;

/**
 * @author xian-guo
 * @email 498152332@qq.com
 * @date 2016/9/2.
 */
public interface RidingBikeService {

    /**
     * 查询用户创建的和加入的车队
     * @param userId
     * @return
     */
    APIResponse<List<RespRidingCheckBike>> getRidingBikeMessage(String userId);

    /**
     * 创建车队
     * @param userId
     * @return
     */
    APIResponse createRidingBike(String userId, String longLat);

    /**
     * 定时删除创建超过72小时的车队
     * @return
     */
    void delRidingBike();

    /**
     * 加入车队
     * @param reqJoinRidingBike
     * @return
     */
    APIResponse<List<TbRidingBikePeople>> joinRidingBike(ReqJoinRidingBike reqJoinRidingBike);


    /**
     * 创建车队成功，加入车队
     * @param
     * @return
     */
    APIResponse<List<TbRidingBikePeople>> createBikeJoin(String command);

    /**
     * 实时跟新车队成员位置
     * @param updateBikePeopleLocation
     * @return
     */
    APIResponse<List<RespUpdateBikePeopleLocation>> updateRidingBikePeopleLocation(ReqUpdateBikePeopleLocation updateBikePeopleLocation);

    /**
     * 车队管理
     * @param command
     * @return
     */
    APIResponse<RespRidingBikeManager> managerBikePerple(String command);

    /**
     * 退出车队
     * @param userId
     * @return
     */
    APIResponse quitRidingBike(String userId, String command);

    /**
     * 删除车队成员
     * @param leaderId
     * @param userId
     * @param command
     * @return
     */
    APIResponse delRidingBikePeople(String leaderId, String userId, String command);

    /**
     * 跟新车队公告
     * @param notice
     * @return
     */
    APIResponse updateRidingBikeNotice(String userId, String command, String notice);
}
